Practical Programming (Nathan W. Lindstrom) by Jennifer Campbell & Paul Gries & Jason Montojo & Greg Wilson

Practical Programming (Nathan W. Lindstrom) by Jennifer Campbell & Paul Gries & Jason Montojo & Greg Wilson

Author:Jennifer Campbell & Paul Gries & Jason Montojo & Greg Wilson
Language: eng
Format: mobi
Tags: Pragmatic Bookshelf
ISBN: 9781934356272
Publisher: The Pragmatic Bookshelf (326714)


Many set methods can also be written using operators. If acids and bases are two sets, for example, then acids | bases creates a new set containing their union (that is, all the elements from both acids and bases), while acids <= bases tests whether all the values in acids are also in bases. All the operators that sets support are listed in Table 12, ​Set operators​.

Table 12. Set operators

* * *

Method Call

Operator

set1.difference(set2)

set1 - set2

set1.intersection(set2)

set1 & set2



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.